package com.me.mygdxgame.renderer;

import com.badlogic.gdx.assets.AssetManager;

public class AssetsManager
{
	private static AssetManager assetManager = null;
	private static AssetsManager instance = null;
	public boolean isDone = false;
	public float progress = 0;
		
	private AssetsManager()
	{
		assetManager = new AssetManager();
	}
	
	public static AssetManager getInstance()
	{
		if(instance == null)
		{
			instance = new AssetsManager();
		}
		
		return assetManager;
	}
	
	public float getProgress()
	{
		return progress;
	}
	
	public void update()
	{
		if(assetManager.update())
		{
			isDone = true;
		}
		else
		{
			isDone = false;
		}
		
		progress = assetManager.getProgress();
		
	}

	
}
